1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a program.
2. Description of the Related Art
There exists an image input-output system that outputs multi-level image data read by an input device such as a scanner or a digital camera to an output device such as a printer or a display. There is a process called a pseudo-halftone process as a method of converting, when the multi-level image data is to be output, the multi-level image data read by the input device (for example, 256-level gray scale in 8-bit accuracy) to image data having the number of gradations that can be output by the output device, and of expressing continuous gradation in a pseudo manner. If the output device can express only binary values “ON/OFF” of dot, a binarizing process is conventionally performed. The binarizing process includes a dither process capable of performing a high-speed process, and also an error diffusion method and an average-error minimization method which are excellent in both resolution capability and gradation capability.
The error diffusion method mentioned here represents a type of method for smoothly expressing an image through a halftone process. This method is implemented by minimizing an error as a whole by allocating the error produced by the process for pixels of a digital image to neighboring pixels and performing the process afterward considering the influence of the allocation of the error on the neighboring pixels.
The average-error minimization method mentioned here represents a method for determining each value of pixels so that a difference between gray values of an original image and values expressed by binarizing the original image is reduced on the average.
The error diffusion method and the average-error minimization method are different from each other only in when to perform an error diffusion operation, and are logically equivalent to each other. There is also a multi-level error diffusion method based on the error diffusion method that is further applied to not only binary gradation but also ternary or higher gradation. The multi-level error diffusion method, similarly to a binary error diffusion method, allows the process excellent in gradation capability and resolution capability.
There are various methods used to ensure the ternary or higher gradation in the output device.
An inkjet printer reproduces the ternary or higher gradation by changing each dot diameter of large, medium, and small dots under control of an amount of ink to be ejected, by overstriking dots, or by using inks of different densities i.e., high- and low-density inks.
The density of the low-density ink is usually diluted to ½ to ⅙ of the high-density ink. In addition, there is a method of ensuring the ternary or higher gradation by controlling an amount of ink to be transferred to a paper due to change of an engraved depth to a plate in relief printing such as gravure printing.
Incidentally, when electrophotographic printing is performed by a printing machine or an inkjet printer, there sometimes occurs a phenomenon so-called dot gain that obtained halftone dots are bigger, as compared with original halftone dots, caused by ink bleed or ink spread. In an error diffusion process, a locally produced error is diffused to neighboring pixels and is fed-back so as to keep the density. However, because of the dot gain, the halftone dots become bigger with respect to an original input value in a high-density portion, which causes density saturation to easily occur in the high-density portion.
If the dither process is used for image processing, there is no problem because designing can be done by considering the influence of the dot gain on the high-density portion.
Here, a dither method is a method of displaying a gray image by binary values (black and white). This is similar to ordinary binarization. Thus, by performing the binarization with threshold values that randomly change, the image seems to have shades of black and white though the shades are binary values seen from a distance. This is a result of using an optical illusion of the human eye. The dither method is used for photographs of newspapers or color printers.
As for the dither, it is general to use a super cell formed as a rectangle in which a plurality of minimum unit cells forming the dither is combined. If the dither is the super cell whose size is 32×32 and is used for a 1-bit dither process, 1025 dot patterns can be output.
Incidentally, because multi-level image data read by an ordinary input device is 8 bits=256 levels, the 1025 dot patterns are not required. If 256 dot patterns are selected from the number of logically outputtable gradations which is determined from 1025 being the size of the super cell so as to obtain a target brightness or density curve considering the dot gain, then the influence of the dot gain can be made less visible.
Generally, because the dot gain may occur, to use the error diffusion process in ordinary printers, a γ-converted image is subjected to the error diffusion process.
As shown in FIG. 6, if the value after the γ-conversion can be a real number, no problem will occur in the error diffusion.
When a gray-scale level 1 is input in a certain printer, by using a value of 0.52 shown in FIG. 6 to perform the error diffusion, brightness or density corresponding to the input value 1 can be expressed by the dot gain. If the value after the γ-conversion is the real number as shown in FIG. 6, an error diffusion portion has to be also calculated using the real number. In this case, a space of a memory or the like that stores therein errors increases.
Error diffusion technologies considering the dot gain are disclosed in Patent document 1 (Japanese Patent Application Laid-open No. 2007-124195) and Patent document 2 (Japanese Patent Application Laid-open No. 2004-72293).
In the error diffusion method disclosed in Patent document 1, error diffusion is performed in the error diffusion portion by converting 8 bits as an input value to 14 bits. Each input value is not simply increased to 64 times when the number of bits is increased, but the input value is converted to a value expressing target brightness or density considering the dot gain, and this allows sufficient gradation capability.
Patent document 2 discloses that by setting a total of coefficients to diffuse an error to less than 1, the density is not maintained. Based on this, there is characteristic that the density is hard to be saturated in the high-density portion.
Patent document 3 (Japanese Patent Application No. 2007-215289) describes a technique for expressing target brightness or density considering the dot gain by using a plurality of reduction tables in a reduction portion of an error. The invention disclosed in Patent document 3 does not require an error memory more than that for the invention described in Patent document 1.
There are Patent documents 4 and 5 as γ-conversion technologies for error diffusion considering the dot gain.
The invention described in Patent document 4 (Japanese Patent Application No. 2008-214676) is a technology to express a value after the decimal point of a real number value being the value after γ-conversion as shown in FIG. 6, by using area gradation.
Incidentally, the multi-level error diffusion includes one that sets a threshold value according to an input pixel like an invention disclosed in Patent document 6 (Japanese Patent No. 3732470). The invention disclosed in Patent document 6 is a technology to suppress a false contour appearing in gradations due to delay in dot generation occurring in a multi-level switching portion.
An invention described in Patent document 5 (Japanese Patent Application No. 2008-302426), similarly to the invention described in Patent document 4, is a technology to suppress image quality degradation in the multi-level switching portion using the multi-level error diffusion in which area gradation is performed on a value after the decimal point in a real number value obtained after the γ-conversion.
However, in the invention disclosed in Patent document 1, an error memory is required more than that for error diffusion performed on an 8-bit input although the error memory is required less than that for error diffusion performed on the value being a real number obtained after the γ-conversion.
In the invention disclosed in Patent document 2, although the density is hard to be saturated in the high-density portion, dot generation is delayed in a highlight portion because the error is equally distributed by a value of less than 100%.
In the invention disclosed in Patent document 3, it is possible to execute the process with less memory space, however, it is necessary to switch between a plurality of reduction tables in which gradation characteristic is described in each printing mode. Because of this, when the error diffusion process is executed by hardware, it becomes difficult for the invention to support many modes.
In the invention disclosed in Patent document 5, both a γ-conversion table and a threshold table need to be held according to CMYK color plates or the like.
In the invention disclosed in Patent document 6, as a result of subjecting the multi-level error diffusion to the γ-conversion as shown in the invention described in Patent document 4, the image quality degradation occurs in the multi-level switching portion.
A system for achieving the saving in memory while improving the gradation capability in the multi-level error diffusion and suppressing the image quality degradation in the multi-level switching portion has been desired.